<template>
<view>
	<view class="Mediv" v-if="this.islogin==true">
		<view>
			<view class="plate">
				<navigator url="/pages/Questionnaires/Questionnaires" hover-class="other-navigator-hover" class="plate-item">
					<view class="plate-img">
						<image src="../../../static/gn/gn9.png"></image>
					</view>
					<text class="plate-info">
						调查问卷
					</text>
				</navigator>
				<navigator url="/pages/index/Teather" hover-class="other-navigator-hover" class="plate-item">
					<view class="plate-img">
						<image src="../../../static/gn/gn10.png"></image>
					</view>
					<text class="plate-info">
						教师信息
					</text>
				</navigator>
				<navigator url="/pages/index/major"  hover-class="other-navigator-hover" class="plate-item">
					<view class="plate-img">
						<image src="../../../static/gn/gn4.png"></image>
					</view>
					<text class="plate-info">
						专业信息
					</text>
				</navigator>
				<navigator url="/pages/index/book" hover-class="other-navigator-hover" class="plate-item">
					<view class="plate-img">
						<image src="../../../static/gn/gn3.png"></image>
					</view>
					<text class="plate-info">
						教材信息
					</text>
				</navigator>
				<navigator url="/pages/index/School" hover-class="other-navigator-hover" class="plate-item">
					<view class="plate-img">
						<image src="../../../static/gn/gn1.png"></image>
					</view>
					<text class="plate-info">
						学校风采
					</text>
				</navigator>
				<view hover-class="other-navigator-hover" @tap="title" class="plate-item">
					<view class="plate-img">
						<image src="../../../static/gn/gn2.png"></image>
					</view>
					<text class="plate-info">
						更多咨询
					</text>
				</view>
			</view>
		</view>
	</view>
	<view class="Mediv" v-if="this.islogin==false">
		<view>
			<view class="plate">
				 <view hover-class="other-navigator-hover" @tap="erro" class="plate-item">
					<view class="plate-img">
						<image src="../../../static/gn/gn9.png"></image>
					</view>
					<text class="plate-info">
						调查问卷
					</text>
				 </view>
				<view hover-class="other-navigator-hover" @tap="erro" class="plate-item">
					<view class="plate-img">
						<image src="../../../static/gn/gn10.png"></image>
					</view>
					<text class="plate-info">
						教师信息
					</text>
				</view>
				<navigator url="/pages/index/major"  hover-class="other-navigator-hover" class="plate-item">
					<view class="plate-img">
						<image src="../../../static/gn/gn4.png"></image>
					</view>
					<text class="plate-info">
						专业信息
					</text>
				</navigator>
				<view hover-class="other-navigator-hover" @tap="erro" class="plate-item">
					<view class="plate-img">
						<image src="../../../static/gn/gn3.png"></image>
					</view>
					<text class="plate-info">
						教材信息
					</text>
				</view>
				<navigator url="/pages/index/School" hover-class="other-navigator-hover" class="plate-item">
					<view class="plate-img">
						<image src="../../../static/gn/gn1.png"></image>
					</view>
					<text class="plate-info">
						学校预览
					</text>
				</navigator>
				<view hover-class="other-navigator-hover" @tap="title" class="plate-item">
					<view class="plate-img">
						<image src="../../../static/gn/gn2.png"></image>
					</view>
					<text class="plate-info">
						更多咨询
					</text>
				</view>
			</view>
		</view>
	</view>
</view>
</template>

<script>
	export default{
		data(){
			return{
				token:'',
				islogin:'',
				openid:''
			}
		},
		onLoad() {
			this.openid = wx.getStorageSync('openid');
			this.token = wx.getStorageSync('token');
			if(this.token || this.openid){
				this.islogin=true
			}else{
				this.islogin=false
			}
		},
		methods:{
			erro(){
				uni.showToast({
					title: '未登录无法查看',
					icon:"error",
					duration: 2000
				});
			},
			title(){
				uni.showToast({
					title: '等待开发中',
					icon:"none",
					duration: 2000
				});
			}
			
		}
	}
</script>

<style>
	.Mediv{
		height: 220px;
		padding-top: 10px;
		margin-top: 5px;
		background-color:white;
		border-radius: 10px;
		background-color: rgba(255, 255, 255, 0.7);
		font-weight: bolder;
	}
	.plate {
		border-radius: 10px;
		margin-left: 5px;
		margin-right: 5px;
	}
	
	.plate-item {
		display: flex;
		float: left;
		position: relative;
		width: 140rpx;
		height: 185rpx;
		margin-left: 80rpx;
	}
	
	.plate-img image {
		width: 100rpx;
		height: 100rpx;
	}
	
	.plate-info {
		position: absolute;
		height: 20rpx;
		font-size: 30rpx;
		font-family: '微软雅黑';
		bottom: 60rpx;
		left: -10rpx;
	}
</style>